package Person.File;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class FileInputStreamDemo01 {
    public static void main(String[] args) throws IOException {
        //创建字节输入流对象
        FileInputStream fis = new FileInputStream("d:\\fos.txt");
   /* byte[] bys=new byte[5];
        int len = fis.read(bys);*/
        /*System.out.println(len);
        System.out.println(new String(bys));
        len = fis.read(bys);
        System.out.println(len);
        System.out.println(new String(bys));
        fis.close();*/
byte[] bys = new byte[1024];
int len;
while((len=fis.read(bys))!=-1){
    System.out.println(new String(bys,0,len));
}


    }
}
